x86/p2m: collapse the two ->write_p2m_entry() hooks
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:33:18 +0000 (12:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:33:18 +0000 (12:33 +0100)
commit192b45e0e4180326b1312ae8bdabf477d086c400
treee80d3ff15ff69a4ed3390d1373437fea1f40063f
parent5505f5f8e7e805365cfe70b6a4af6115940bb749
x86/p2m: collapse the two ->write_p2m_entry() hooks

The struct paging_mode instances get set to the same functions
regardless of mode by both HAP and shadow code, hence there's no point
having this hook there. The hook also doesn't need moving elsewhere - we
can directly use struct p2m_domain's. This merely requires (from a
strictly formal pov; in practice this may not even be needed) making
sure we don't end up using safe_write_pte() for nested P2Ms.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/mm/shadow/none.c
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/p2m.h
xen/include/asm-x86/paging.h